package cn.pluss.baselibrary.http;

import java.util.HashMap;

import io.reactivex.Observable;
import io.reactivex.Single;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface ApiServices {

    @POST("unite/service")
    Observable<ResponseBody> request(@Body RequestBody param);

    @POST("unite/service")
    Single<ResponseBody> requestSingle(@Body RequestBody param);



    @GET("https://api.weixin.qq.com/sns/oauth2/access_token")
    Observable<HashMap> requestWxAccessToken(@Query("appid") String appId, @Query("secret") String secret, @Query("code") String code, @Query("grant_type") String type);

    @GET("https://api.weixin.qq.com/sns/userinfo")
    Observable<HashMap> requestWxUserInfo(@Query("access_token") String accessToken, @Query("openid") String openId);
}
